home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / TouchMe 1.1.1.sit / touchMe 1.11 Folder / How to get 68K&PPC binaries next >
Text File  |  1996-08-08  |  3KB  |  38 lines

  1. Technical Note for touchMe 1.11:
  2. Copyright ゥ1996 Mizutori Tetsuya
  3. How to get the thinest binaries for 68K or PPC machines
  4.  
  5. "touchMe" application program is distributed as a "fat" binary, that means both PPC code and 68K code are stored in it. Alas! the program size becomes incredibley so large up to about 463 K bytes in disk. There are something tools to strip the other code for getting "thin" binary. Or, you can manage to create 68K and PPC versions, following the instructions.
  6.  
  7. 1. True code
  8. For the executable program code, PPC application has it in data fork, whereas 68K has in resource fork as a 'CODE' type. They are separately independent in executing on either 68K or PPC machines. As for "touchMe" program, the resource type 'DATA' is only referred by 68K code, and for the corresponding data are entirely embedded in data fork as a portion of PPC program code. In PPC application, there must be a unique resource type 'cfrg', an abbreviation for 'code fragment', that is a flag to determine whether this program is a 68K or PPC application. Now let's find out the configuration of the program code.
  9.  
  10.              in data fork  in resource fork
  11.               (ppc code)   'CODE'    'DATA'   'cfrg'    others      total
  12.     FAT:     needed        needed    needed   needed  needed     463KB
  13.     PPC:    needed         -zero-  -zero-  needed  needed     300KB
  14.     68K:   -zero-        needed    needed   -zero- needed     204KB
  15.  
  16. 2. Using strip tools
  17. You can instantly remove the other code, using William Edward Woody's "Strip68k" and "StripPPC". But after applying it to my "touchMe" program, I found some vain data still remains in the resource fork. Now watch it!
  18.  
  19. Applying "Strip68k" and "StripPPC" to FAT binary, we will get;
  20.               (ppc code)   'CODE'    'DATA'   'cfrg'     others      total
  21.  my.PPC:   exists        -vain-  -vain-  exists    exists*   337KB*
  22.  my.68K:  -zero-       exists    exists   -zero-   exists     204KB
  23.  
  24. I have checked that 68K and my.68K programs are exactly the same ones. The "Strip68K" may leave some vain resource 'CODE', 'DATA' and besides adds an 'ALRT'+'DITL' (ID=27309) in my.PPC code, that makes a difference in total program size.
  25.  
  26. 3. To get the thinest code
  27. Are you an expert on "ResEdit" or "Resorcerer"? If so, it's great and fun! You just remove the other codes from the program code to get a thinned application program, that will take only one or two minutes to work around. Let's follow the instructions;
  28.  (1) to get PPC application, apply it to "touchMe" program code...
  29.     * Remove 'CODE' (all) and 'DATA' (all) resource data
  30.     * Remove 'ALRT'+'DITL' (ID=27309 only) if you have applied "Strip68k"
  31.  (2) to get 68K application, apply it to "touchMe" program code...
  32.     * Remove 'cfrg' (all) resource data
  33.     * Remove its data fork, using "StripPPC" or "Resorcerer"
  34.         I am afraid it is not able to handle the data fork by the regular "ResEdit".
  35. --
  36. Mizutori Tetsuya, RCAST, Univ. of Tokyo, Japan
  37. mizutori@ai.rcast.u-tokyo.ac.jp
  38.